//
//  ChangeDoctorState.m
//  EcmDoctor
//
//  Created by Mac on 16/2/19.
//  Copyright © 2016年 张进. All rights reserved.
//

#import "ChangeDoctorState.h"
#import "NetWorkUtil.h"
#import <SSKeychain/SSKeychain.h>
#import "AppUtils.h"
@implementation ChangeDoctorState
+(void)changeDoctorStateWithDoctorId:(NSString *)doctorId Fs:(NSString *)fs Ols:(NSString *)ols Phs:(NSString *)phs Adds:(NSString *)adds success:(void (^)(ChangeDoctorState *))success failure:(void (^)(NSError *))failure
{
    
    NetWorkBaseRequest *req = [[NetWorkBaseRequest alloc] init];
    //请求参数
    
    req.moduleName = @"DoctorRS";
    req.methodName = @"updateDoctorWorkState";
    [req setValue:doctorId forKey:@"doctor_info_id"];
    [req setValue:phs forKey:@"phone_state"];
    [req setValue:ols forKey:@"online_state"];
    [req setValue:fs forKey:@"free_state"];
    [req setValue:adds forKey:@"addnum_state"];
    
    [NetWorkUtil requestWithPOST:req success:^(NetWorkBaseResponse *responseObject) {
        NSError *error = nil;
        
       
            ChangeDoctorState *changeDoctorState=[[ChangeDoctorState alloc]init];
            changeDoctorState.code=[NSString stringWithFormat:@"%@",responseObject.code];
            changeDoctorState.msg=responseObject.msg;
                       success(changeDoctorState);
        
        
    } failure:^(NSError *error) {
        failure(error);
        
    } cache:NO];

}
@end
